import ajax from './index'

export function order_list(condition) {
  if (!condition) {
    condition = {
      pageNum: 1,
      pageSize: 20
    }
  }
  return ajax({
    url: "/pms/order/list",
    method: "post",
    data: condition
  });
}
export function order_detail(id) {
  return ajax({
    url: "/pms/order/detail" + "/" + id,
    method: "get"
  });
}
export function order_logistics() {
  return ajax({
    url: "/pms/order/logistics",
    method: "get"
  });
}
export function order_send(data) {
  return ajax({
    url: "/pms/order/send",
    method: "post",
    data: data
  });
}
export function order_edit_send(data) {
  return ajax({
    url: "/pms/order/editSend",
    method: "post",
    data: data
  });
}
export function order_settle_list(condition) {
  if (!condition) {
    condition = {
      pageNum: 1,
      pageSize: 20
    }
  }
  return ajax({
    url: "/pms/order/settle_list",
    method: "get",
    params: condition
  });
}
export function order_settle_list_export(condition) {
  return ajax({
    url: "/pms/order/settle_list_export",
    method: "get",
    params: condition
  });
}

export function logistics_query(condition) {
  return ajax({
    url: "/pms/order/logistics_query",
    method: "get",
    params: condition
  });
}

export function logistics_alibaba_query(condition) {
  return ajax({
    url: "/pms/order/logistics_alibaba_query",
    method: "get",
    params: condition
  });
}
export function order_profit_list(condition) {
  if (!condition) {
    condition = {
      pageNum: 1,
      pageSize: 20
    }
  }
  return ajax({
    url: "/pms/order/order_profit_list",
    method: "get",
    params: condition
  });
}
export function order_profit_list_export(condition) {
  return ajax({
    url: "/pms/order/order_profit_list_export",
    method: "get",
    params: condition
  });
}
export function order_create(data) {
  return ajax({
    url: "/pms/order/create",
    method: "post",
    data: data
  });
}
export function order_cancel(id) {
  return ajax({
    url: "/pms/order/cancel/" + id,
    method: "post"
  });
}
export function order_pay(id) {
  return ajax({
    url: "/pms/order/pay/" + id,
    method: "post"
  });
}
export function order_feedbackNew(data) {
  return ajax({
    url: "/pms/order/feedbackNew",
    method: "post",
    data: data
  });
}
export function order_feedbackHasSend(data) {
  return ajax({
    url: "/pms/order/feedbackHasSend",
    method: "post",
    data: data
  });
}
export function order_feedbackCancel(data) {
  return ajax({
    url: "/pms/order/feedbackCancel",
    method: "post",
    data: data
  });
}
export function order_feedbackConfirm(data) {
  return ajax({
    url: "/pms/order/feedbackConfirm",
    method: "post",
    data: data
  });
}
export function order_export(condition) {
  return ajax({
    url: "/pms/order/export",
    method: "post",
    data: condition
  });
}
export function order_batchComplete(condition) {
  return ajax({
    url: "/pms/order/batchComplete",
    method: "post",
    data: condition
  });
}
export function order_batchMakeProfitDay(condition) {
  return ajax({
    url: "/pms/order/batchMakeProfitDay",
    method: "post",
    data: condition
  });
}
export function order_batchMakeProfitMonth(condition) {
  return ajax({
    url: "/pms/order/batchMakeProfitMonth",
    method: "post",
    data: condition
  });
}


export function order_batch_send(data) {
  return ajax({
    url: '/pms/order/batchSend',
    method: 'post',
    data: data
  })
}

export function order_sync(params) {
  return ajax({
    url: '/pms/order/sync',
    method: 'get',
    params: params
  })
}
